﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ServiceAgent.UserAccountService;
using Infrastructure.Account;

namespace UserAccountModule.Services
{
    public static class LocalAccountService
    {
        public static void StoreAccount(UserDTO user)
        {
            ActiveAccount.Instance.ID = user.ID;
            ActiveAccount.Instance.TenTaiKhoan = user.TenTaiKhoan;
            ActiveAccount.Instance.TenNguoiDung = user.TenNguoiDung;
            ActiveAccount.Instance.MatKhau = user.MatKhau;
            ActiveAccount.Instance.Email = user.Email;
            ActiveAccount.Instance.DienThoai = user.DienThoai;
            ActiveAccount.Instance.DanhSachQuyen = user.DanhSachQuyen;
            ActiveAccount.Instance.DanhSachDonVi = user.DanhSachDonVi;
        }

        public static void Logout()
        {
            ActiveAccount.Instance.Clear();
        }
    }
}
